import Vue from 'vue'
import Router from 'vue-router'
let dev = ['development']
let _import = require('./_import_development')
console.log(process.env.NODE_ENV,'process.env.NODE_ENV 1')
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/home'
    },
    {
      path: '/main',
      name: 'main',
      component: _import('main'),
      meta: { title: '扫码点餐' , isBack:0 },
      children:[{
          path: '/home',
          name: 'homeIndex',
          meta: { title: '美食' , isBack:0 },
          component: _import('home/index')
      
      },{
        path: '/cart',
        name: 'cart',
        meta: { title: '购物车' , isBack:0 },
        component: _import('cart/index')
    
    },{
      path: '/mine',
      name: 'mine',
      meta: { title: '首页' , isBack:1 },
      component: _import('mine/index')
  
  }]
  },
    {
      path: '/index',
      name: 'index',
      meta: { title: '主页' , isBack:1 },
      component: _import('index')
  },
  {
    path: '/home',
    name: 'home',
    meta: { title: '首页' , isBack:1 },
    component: _import('home/index')
},

  ]
})
